{include file="header.html"}
<div id="page-meal" class="w-full">
	<div class="w clearfix">
    	<div class="mealinfo">
        	<div class="title title_top clearfix">
				<div class="price clearfix">
					<p><span class="txt">{$lang.yh_meal}{$lang.colon}</span><span>{$lang.old_price}{$lang.colon}<del>{$meal.price|price_format}</del></span></p>
                	<p><strong>{$meal.mealPrice|price_format}</strong></p>
                </div>
                <div class="sale"><b class="J_TotalSave"></b></div>
                <div class="desc">{$lang.select_meal_note}</div>
            </div>
            <div class="content clearfix">
				<form name="meal_form">
            	<div class="box clearfix">
                    <!--{foreach from=$meal.items item=goods name=fe_goods}-->
                    <dl class="goodsbox {if $smarty.foreach.fe_goods.last} goodsbox-last{/if} clearfix">
      					<dt class="pic big_pic float-left"><a href="{url route='goods/index' id=$goods.goods_id}" target="_blank"><img width="160" height="160" src="{$goods.goods_image|url_format}" /></a></dt>
						<dd class="desc float-left">
     						<h2><strong>[{$lang.meal_goods}{$smarty.foreach.fe_goods.iteration}]</strong><a class="fs14 f66" href="{url route='goods/index' id=$goods.goods_id}" target="_blank">{$goods.goods_name|escape}</a></h2>
   							<div class="rate"><span>{$lang.price}{$lang.colon}</span><b class="price J_SpecPrice" price="{$goods.price}">{$goods.price|price_format}</b></div>
							<div class="handle">
								<!--{if $goods.spec_qty gt 0}-->
								<ul class="clearfix">
									<li class="handle_title">{$goods.spec_name_1|escape}{$lang.colon} </li>
									<!--{foreach from=$goods.unispecs.spec_1 item=spec key=id}-->
                                	<li onclick="selectSpec(1, this,{$goods.spec_qty},{$goods.goods_id},{$meal.mealPrice})" class="dotted"><a href="javascript:;">
                                    <!--{if $spec.image}-->
                                    <img src="{$spec.image|url_format}" width="25" height="25" style="vertical-align:middle" />
                                   	<!--{/if}-->
                                    <span>{$spec.name}</span></a></li>
                                	<!--{/foreach}-->
                           	 	</ul>
                           	 	<!--{/if}-->
                            	<!--{if $goods.spec_qty gt 1}-->
                            	<ul class="clearfix">
                            		<li class="handle_title">{$goods.spec_name_2|escape}{$lang.colon}</li>
                                	<!--{foreach from=$goods.unispecs.spec_2 item=spec key=id}-->
                                	<li onclick="selectSpec(2, this,{$goods.spec_qty},{$goods.goods_id},{$meal.mealPrice})" class="{if $id eq $goods.spec_id}solid{else}dotted{/if}"><a href="javascript:;"><span>{$spec.name}</span></a></li>
                                	<!--{/foreach}-->
                            	</ul>
                            	<!--{/if}-->
							</div>
							<input type="hidden" name="specs[]" value="{$goods.spec_id}" />
						</dd>
					</dl>
					<!--{/foreach}-->
                </div>
				<div class="title btitle J_FixedButtonBottom clearfix">
					<div class="price clearfix">
                		<p><span class="txt">{$lang.yh_meal}{$lang.colon}</span><span>{$lang.old_price}{$lang.colon}<del>{$meal.price|price_format}</del></span></p>
                		<p><strong>{$meal.mealPrice|price_format}</strong></p>
					</div>
                	<div class="buy"><input type="button" class="btn_c1 J_SubmitMealOrder" meal_id="{$meal.meal_id}" /></div>
            	</div>
				</form>
            </div>
        </div>
	</div>
</div>
<script type="text/javascript">
$(function(){
	$(".J_TotalSave").html(price_format(parseFloat("{$meal.price}")-parseFloat("{$meal.mealPrice}")));
	var  holder = $(".J_FixedButtonBottom"),
		oTop = holder.offset().top;

    $(window).unbind('scroll').bind('scroll', function(){
		var dTop = $(document).scrollTop(),
    		wHeight = $(window).height();
    	if (dTop < (oTop - wHeight + 74)) {
    		holder.addClass('fixed');
    	} else {
    		holder.removeClass('fixed');
    	}
	});
});
</script>
{include file="footer.html"}